#  def factorial(n):
#      if n == 0:
#          return 1
#      ret = 1
#      while n!=0:
#          ret *= n
#          n-=1
#      return ret

def cnt_trailing_zeros(n):
    cnt=0
    while n%10 == 0:
        n //= 10
        cnt+=1
    return cnt


n = 1
prev = 0
for i in range(1,10001):
    n*=i
    if(prev != cnt_trailing_zeros(n)):
        fives = 0
        for j in range(5,i+1):
            for k in range(5, j, 5):
                if j%k==0:
#                    fives += 
        print(fives)
        prev = cnt_trailing_zeros(n)
        print(i, prev)
